import 'package:flutter/material.dart';

class TagButton extends StatelessWidget {
  String title;
  TagButton(this.title);
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        print("点击了" + title);
      },
      child: Opacity(
        opacity: 0.5,
        child: Container(
          decoration: BoxDecoration(
              color: Colors.black12,
              borderRadius: BorderRadius.circular(3)
          ),
          margin: EdgeInsets.only(right: 15, left: 3),
          padding: EdgeInsets.only(left: 6, right: 6),
          // width: 52,
          height: 26,
          child: Center(child: Text(title,maxLines: 1, textAlign: TextAlign.center, style: TextStyle(fontSize: 13, color: Colors.black54, fontWeight: FontWeight.w600),)),
        ),
      )
    );
  }

}
